"""
    ================================================================================
                            ------------utf-8--------------
    ================================================================================
@Author: 
    rfdsg
@Create Time: 
    2024/9/22 - 20:13
@Description:

@Attention:
    
"""


class bcolors:
    MYRED = '\033[1;31m'  # 自定义红色
    HEADER = '\033[95m'  # 淡紫色
    OKBLUE = '\033[94m'  # 蓝色
    OKGREEN = '\033[92m'  # 绿色
    WARNING = '\033[93m'  # 黄色警告
    FAIL = '\033[91m'  # 红色
    YELLOW = '\033[1;33m'  # 更明确的黄色
    ORANGE = '\033[38;5;208m'  # 橙色 需要支持256色

    BRIGHT_BLUE = '\033[1;94m'  # 亮蓝色文本
    BRIGHT_MAGENTA = '\033[1;95m'  # 亮紫色文本
    BRIGHT_CYAN = '\033[1;96m'  # 亮青色文本
    BRIGHT_WHITE = '\033[1;97m'  # 亮白色文本

    BG_BLUE = '\033[44m'  # 蓝色背景
    BG_MAGENTA = '\033[45m'  # 紫色背景
    BG_CYAN = '\033[46m'  # 青色背景
    BG_WHITE = '\033[47m'  # 白色背景

    BOLD = '\033[1m'  # 粗体文本
    UNDERLINE = '\033[4m'  # 下划线文本
    BLINK = '\033[5m'  # 闪烁文本
    INVERSE = '\033[7m'  # 反白显示，交换前景色和背景色

    ENDC = '\033[0m'  # 重置所有属性到默认


def color_text(text, color):
    """Utility to color text with reset."""
    return f"{color}{text}{bcolors.ENDC}"
